//
//  NWEnquiryPlanRequest.m
//  KuWoCan
//
//  Created by hwd on 17/3/27.
//  Copyright © 2017年 hwd. All rights reserved.
//

#import "NWEnquiryPlanRequest.h"

@implementation NWEnquiryPlanRequest

//获取用户要货计划列表接口

- (void)startRequestGetPlanListWithUserId:(NSString *)userId pageNo:(NSString *)pageNo pageSize:(NSString *)pageSize
{
    _showError = YES;
    _showLoading = YES;
    _path = NWEnquiryPlanList_Path;
    
    NSMutableDictionary *dic = [[NSMutableDictionary alloc]initWithDictionary:@{@"userId":userId,@"pageNo":pageNo,@"pageSize":pageSize}];
    _params = dic;
    [self startPost];
}


//根据用户Id查询下级所有经销商
- (void)startRequestGetAllAgencyWithUserId:(NSString *)userId
{
    _showError = YES;
    _showLoading = YES;
    _path = NWEnquiryPlanAllAgency_Path;
    
    NSMutableDictionary *dic = [[NSMutableDictionary alloc]initWithDictionary:@{@"userId":userId}];
    _params = dic;
    [self startPost];
}

//添加要货计划
- (void)startRequestAddPlanWithDic:(NSMutableDictionary *)dic
{
    _showError = YES;
    _showLoading = YES;
    _path = NWEnquiryPlanAddPlan_Path;
    
    _params = dic;
    [self startPost];
}

//要货计划明细
- (void)startRequestPlanDetailWithCargoPlanId:(NSString *)cargoPlanId
{
    _showError = YES;
    _showLoading = YES;
    _path = NWEnquiryPlanDetail_Path;
    
    NSMutableDictionary *dic = [[NSMutableDictionary alloc]initWithDictionary:@{@"cargoPlanId":cargoPlanId}];
    _params = dic;
    [self startPost];
}

//根据要货计划Id删除要货计划
- (void)startRequestDeletePlanWithId:(NSString *)id
{
    _showError = YES;
    _showLoading = YES;
    _path = NWEnquiryPlanDelete_Path;
    
    NSMutableDictionary *dic = [[NSMutableDictionary alloc]initWithDictionary:@{@"id":id}];
    _params = dic;
    [self startPost];
}


@end
